Repository navigation
Upstream sync 10D: shader recompiler slice (7 commits) - #492
Merged
Merged
Conversation
TryMakeTableImage planned a T# read from a bindless image table only when its eight scalar reads had no user other than that one GetImageResource. Descriptor-phi splitting gives each image operation its own copy of the T# over the same reads, so a table entry that is both queried and sampled was refused, and GetHandle then rejected the scalar reads. Accept reads whose every user is a GetImageResource built from exactly those eight reads; each copy is planned as the same table. A shipped title stops on such a shader at start-up: image_get_resinfo and image_sample_lz on one s_buffer_load_dwordx8 T#. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit e015772)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit cd1757e)
boykopovar#757 and boykopovar#758 add their image table checks where this check was, after verifyBindlessTable, so the pull requests conflicted. (cherry picked from commit e092d2a)
The front end rebuilds operand flushes, NaN checks and bitcasts for every use of a register, and nothing merged them when SPIRV-Tools is off. A dominator-scoped value numbering pass before SPIR-V emission replaces a pure value with an earlier identical one in the same or a dominating block. Only operations that are functions of their operands are merged; loads, stores, atomics, barriers, phis and cross-lane reads are left alone. A block the entry does not reach throws. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit f0f920a)
FunctionLdsDwords bounds every LDS access by its address argument and gives up on opcodes without a dword count. DataAppend and DataConsume have neither: their first argument is M0, which only places GDS counters, and the emitter addresses the LDS counter by the instruction offset alone. Any pixel or vertex-path program with ds_append or ds_consume therefore declared the full 8192-dword Function array per invocation. LLVM 20 llvmpipe needs about 6 s to compile that array in the new pixel LDS read-modify-write test, which ran past the 5 s graphics fence on CI. The counter now takes the dword at its offset. (cherry picked from commit 13cc3a9)
Every hull program with a BDA access was refused with "BDA fault termination requires a barrier-safe tessellation-control execution protocol". The refusal predates BdaInvocationsMayStop: a program with s_barrier no longer stops a faulting invocation; the fault is recorded, the read returns zero and every invocation reaches the barrier. In a hull, s_barrier is the only control barrier the backend emits after the guest code starts, so that rule already covers it, and a hull without one can stop an invocation without stranding a barrier. The tessellation test draws hulls that scale their levels by a BDA read, with and without s_barrier, and requires an unmapped read to report a tessellation-control fault (not on llvmpipe, which runs hull loads that the unmapped-address check skips). The contract test now accepts a hull with s_barrier. (cherry picked from commit c1e4a0b)
(cherry picked from commit bfab566)
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sync 10 slice D: shader recompiler
Cherry-picks (
-x) fromd8888df9b..upstream/main, scopes shader, recompiler and structurizer.ShaderDiskCachepayload layout is unchanged, soFormatVersionis not bumped.Ported (7)
RedundantValueEliminatorpass, run after interface preparation; addsagc_redundant_value_elimination_tests)Tessellation.cppexecution-test hunks conflict with main's version and were not taken)BufferDescriptorRuntime.cpptest does not exist on main and was not taken). The "Scalar buffer descriptors" entry from the earlier scalar-load commit was added todocs/dev/TechnicalDebt.mdhere, because that entry was missing from main.Skipped
TStepstyle rename, ignore unused descriptor fields for scalar buffer loads.DecodeDrawProgramsinDrawDispatch.cppand the Metal draw path, so it needs its own port.TessellationLowering.cppon main lacks the evaluator and record helpers it builds on (they come with agc-scope hull work); two conflicting hunks.ShaderDiskCache,VulkanDevice.cpp, tests deleted on main); performance only, Windows part not applicable.core/shader(hull patch index, 2D-array image access on 3D T#, dithered alpha coverage, mesh clip/cull distances): belong to the AGC driver slice.Evidence
ANYPS5_ROSETTA_LIBS=ONbuild (nice -n 10, 4 jobs) ofrosetta_libs rosetta_enginesucceeded.core/libs/prx/libSceAgcDriver/tests/RedundantValueElimination.cppbuilt standalone against the recompiler sources (clang++ -O0, the disk cache and SPIR-V optimizer pieces stubbed or left out) and exits 0.ResourceTracker.cpp,ResourceMaterializer.cpp,Recompiler.cpp,SpirvAnalysis.cpp,SpirvBdaRead.cpp,ShaderMemory.cppandBdaContracts.cpppassclang++ -std=c++20 -fsyntax-only.tools/smoke.sh <build> 300 --map): main menu <= 65 s, leader select <= 77 s, map generation start <= 98 s, 2069 frames presented, no fault or uncaught exception, shader disk cache 0 load failures and 0 write failures.agc_driver_*execution tests (they need a Vulkan test device), the metal shader bridge ctest (that configuration does not compile the recompiler), the Metal shader converter on output of the new value-elimination pass beyond what the smoke exercised.🤖 Generated with Claude Code